package day20171221;

import java.io.*;
import java.util.HashMap;
import java.util.Map;

public class Test {
    public static void main(String[] args) {
        Map<String,Integer>map=new HashMap<>();
        String stuNo="";
        //字符流方式
        String path="F\\大二上学期\\JAVa\\期末大作业\\data\\name.txt";
        BufferedReader reader=null;
        try {
            reader=new BufferedReader(new FileReader(path));
            while ((stuNo = reader.readLine()) != null) {
                map.put(stuNo,0);
            }
        } catch (FileNotFoundException e) {
            e.printStackTrace();
        } catch (IOException e) {
            e.printStackTrace();
        } finally {
            try {
                reader.close();
            } catch (IOException e) {
                e.printStackTrace();
            }
        }
    }

}
